#include <cstdlib>
#include <iostream>

#include "Stage.h"

namespace RSIM{

volatile int Stage::CurrentStage;
		
// Static function		
void Stage::printCurrentStage(){
	if (CurrentStage==EMPTY){
		std::cout<<"Stage.h:Current Stage is EMPTY";
	}
	else if(CurrentStage==MODEL){
		std::cout<<"Stage.h:Current Stage is MODEL";
	}
	else if(CurrentStage==TOPOLOGYMAPS){
		std::cout<<"Stage.h:Current Stage is TOPOLOGYMAPS";
	}
	else if(CurrentStage==POSITION){
		std::cout<<"Stage.h:Current Stage is POSITION";
	}
	else if(CurrentStage==TOPOLOGY){
		std::cout<<"Stage.h:Current Stage is TOPOLOGY";
	}
	else if(CurrentStage==VELOCITY){
		std::cout<<"Stage.h:Current Stage is VELOCITY";
	}
	else if(CurrentStage==ACCELERATION){
		std::cout<<"Stage.h:Current Stage is ACCELERATION";
	}
}

// Static function
void Stage::error(){
	std::cout<<"Stage is too low. "; Stage::printCurrentStage();
	std::cout<<"\nExiting...\n";
	exit(0);
}

} // namespace RSIM